"""
面试管理URL配置
"""
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from . import views

app_name = 'interviews'

# 创建路由器
router = DefaultRouter()
router.register(r'categories', views.InterviewCategoryViewSet, basename='category')
router.register(r'questions', views.InterviewQuestionViewSet, basename='question')
router.register(r'applications', views.InterviewApplicationViewSet, basename='application')
router.register(r'interviews', views.InterviewViewSet, basename='interview')
router.register(r'results', views.InterviewResultViewSet, basename='result')
router.register(r'tasks', views.InterviewTaskViewSet, basename='task')
router.register(r'practice/sessions', views.PracticeSessionViewSet, basename='practice-session')
router.register(r'practice/records', views.PracticeRecordViewSet, basename='practice-record')

urlpatterns = [
    # ViewSet路由
    path('', include(router.urls)),

    # 额外的功能性API
    path('statistics/', views.interview_statistics, name='statistics'),
    path('available-teachers/', views.available_teachers, name='available-teachers'),
    path('check-expired/', views.check_expired_interviews, name='check-expired'),
]
